home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
trap13.arc
/
TRAP13.DOC
< prev
Wrap
Text File
|
1988-04-09
|
2KB
|
60 lines
TRAP13 - Eric Pederson
TRAP13 is useful for both sides of the int13 copy breaking school.
The debug-trackers will find it useful because it gives the location the
interrupt is made from. Actually, you just subtract one from the
offset given from TRAP13, and then (U)nassemble using debug.
The other side, the result-fakers, will more readily appreciate the
TRAP13 output. I have chosen to give calling and return arguments
in register style, rather than symbolically. At least one int13
trap program I know makes the error of not completely symbolizing its
results. If the user must look up the meaning of a function passed,
he might as well have for reference all the register args. I also
chose to include the status of the carry flag.
For reference:
Int 13h
Input:
AH : function
(discussing only function 02, read diskette sectors)
AL : number of sectors
CH : track no.
CL : sector no.
DH : head no.
DL : drive no.
ES:BX : pointer to buffer
Output:
CF : error flag
AH : return code
AL : no. of sectors read
Suggestions:
I would always suggest making two runs of trap13, one with a bona-fide
disk, and another with a bogus disk. This way you can see what
the program is looking for, and then fake it easier.
If you write any fake/fix programs, i would suggest using the same sig
as trap13's. SSFIX is an example. The reason is because you only
want one non-BIOS routine linked to that vector at a time. If you
have more, it really defeats the purpose. without the same signiature,
you might have the TRAP program call your FIX program, and things get
to be a big mess. So, try to use a standard signiature.
Also, to re-install a FIX program for testing, use the ROM13 program to
reset the vector to the BIOS. The old program will still be in
memory, but unused. ROM13 is handy for debugging, as it avoids
alt-ctrl-del'ing a lot.
Note: TRAP13 will work with the printer off in most cases. So the
printer being off will not hang the system.